package de.cbf.cam.dsa.tavern.carte.model.entities.helper;

import java.beans.PropertyChangeSupport;

public class MinMax {
	private Integer min			= 0;
	private Integer max			= 0;
	
	public PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
	
	public static final int PCE_INDEX_min 			= 3;
	public static final int PCE_INDEX_max 			= 4;	
	
	public Integer getMin() {
		return min;
	}
	public void setMin(Integer value) {
		if(value == null || value.equals(min))return;
		Integer oldMin = min;
		min = value;
		propertyChangeSupport.fireIndexedPropertyChange("min", PCE_INDEX_min, oldMin, min);
	}
	public Integer getMax() {
		return max;
	}
	public void setMax(Integer value) {
		if(value == null || value.equals(max))return;
		Integer oldMax = max;
		max = value;
		propertyChangeSupport.fireIndexedPropertyChange("max", PCE_INDEX_max, oldMax, max);
	}	
}
